package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2018/12/15 11:21
 * @description
 */
public class Code461 {
    public int hammingDistance(int x, int y) {
        int z = x ^ y;
        String s = Integer.toBinaryString(z);
        return s.replace("0", "").length();
    }
}
